<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet 
  version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:msxml="urn:schemas-microsoft-com:xslt"
  xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
  exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:param name="currentPage"/>

<xsl:template match="/">
<xsl:variable name="items" select="$currentPage/ancestor-or-self::Website//Documentation[@nodeName='User Manual']/*"/>

<!-- start writing XSLT -->
  <xsl:if test="count($items) &gt; 0">
	  <div class="content_title">
		  <h2>
			  <a href="{umbraco.library:NiceUrl($items[1]/@id)}">
			  <xsl:value-of select="$items[1]/@nodeName"/>
			  </a>
		  </h2>
		  <p>
			  <xsl:variable name="TextContent" select="string($items[1]/documentationText)"/>
			  <xsl:value-of select="concat(substring($TextContent,1,400),'...')" disable-output-escaping="yes"/>
			  
		  </p>
	  </div>
	  <xsl:for-each select="$items[position()>1]">
		  <div class="content_title_round">
			  <b class="rtop">
				  <b class="r5">1</b>
				  <b class="r3">1</b>
				  <b class="r2">1</b>
				  <b class="r1">1</b>
			  </b>
		  </div>
		  <div class="content_title">
		  <h2>
			  <a href="{umbraco.library:NiceUrl(@id)}">
			  <xsl:value-of select="@nodeName"/>
			  </a>
		  </h2>
		  <p>
			  <xsl:variable name="TextContent" select="string(current()/documentationText)"/>
			  <xsl:value-of select="concat(substring($TextContent,1,400),'...')" disable-output-escaping="yes"/>
		  </p>
		  </div>
	  </xsl:for-each>
  </xsl:if>

</xsl:template>

</xsl:stylesheet>